package net.wnb.mineclearance.ui;

import java.awt.Dimension;
import java.awt.Image;
import java.io.IOException;

import wnb.util.io.FileSource;
import wnb.util.io.ImageManager;
import wnb.util.io.Terminal;
import wnb.util.ui.AnimationPane;
import wnb.util.ui.ImageAnimation;

public class WelcomPane extends AnimationPane {

	/**
	 * 
	 */
	public static final int DEFAULT_INTERVAL = 100;
	private static final String IMG_PATH = "res/images/welcom.png";
	
	private static final long serialVersionUID = 1L;
	private static final int DEFAULT_WIDTH = 240;
	private static final int DEFAULT_HEIGHT = 240;
	
	public WelcomPane(){
		super(DEFAULT_INTERVAL, true);
		
		try {
			Image image = ImageManager.getImage(IMG_PATH, FileSource.FILE_SYSTEM);
			ImageAnimation animation = new ImageAnimation(image, 5, 1);
			setAnimation(animation);
		} catch (IOException e) {
			Terminal.writeLine(e.getMessage());
			e.printStackTrace();
		}
		
		setMaximumSize(new Dimension(DEFAULT_WIDTH, DEFAULT_HEIGHT));
	}

}
